<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>企业公告管理系统 - 注册</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/register.css">
</head>
<body>
    <div class="container">
        <div class="register-box">
            <h2>用户注册</h2>
            <form id="registerForm" onsubmit="return false;">
                <div class="avatar-upload">
                    <div class="avatar-wrapper">
                        <img id="avatarPreview" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cccccc'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E" alt="头像预览">
                        <div class="avatar-overlay">
                            <svg class="upload-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white">
                                <path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"/>
                            </svg>
                            <span>点击上传头像</span>
                        </div>
                    </div>
                    <input type="file" id="avatarInput" accept="image/*" onchange="previewAvatar(event)">
                </div>
                <div class="input-group">
                    <input type="text" id="username" required placeholder="请输入账号">
                </div>
                <div class="input-group">
                    <input type="password" id="password" required placeholder="请输入密码">
                </div>
                <div class="input-group">
                    <input type="password" id="confirmPassword" required placeholder="请确认密码">
                </div>
                <button type="submit" onclick="handleRegister()">注册</button>
                <p class="login-link">
                    已有账号？<a href="login.html">返回登录</a>
                </p>
            </form>
        </div>
    </div>
    <script src="../js/config.js"></script>
    <script src="../js/request.js"></script>
    <script src="../js/utils.js"></script>
    <script src="../js/register.js"></script>
</body>
</html> 